﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.ServiceModel.Description;
using System.ServiceModel;
using Pandemia.Servicios;
using Pandemia.Funcionalidad;
using System.Configuration;

namespace PandemiaServer
{
    public partial class Form1 : Form
    {
        private Pandemonium _pandemonium;

        public Form1()
        {
            InitializeComponent();
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            try
            {
                Text = ConfigurationManager.AppSettings["Server"];
                _pandemonium = new Pandemonium();
                _pandemonium.RefrescarConfiguracion();
                _pandemonium.IniciarServicios();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "ERROR", MessageBoxButtons.OK, MessageBoxIcon.Error);   
            }
        }

        protected override void OnPaint(PaintEventArgs e)
        {
            this.Visible = false;
            base.OnPaint(e);
        }
    }
}
